#!/bin/bash

# Initial ideas from http://code.google.com/p/smali/wiki/BuildProcedure
DIR=$(pwd)
MVN=/usr/bin/mvn-2.2

echo "Current dir is ${DIR}"

git pull
git status

rm -rf ${DIR}/*/target
cd ${DIR}/util && ${MVN} install
cd ${DIR}/dexlib && ${MVN} install
cd ${DIR}/smali && ${MVN} assembly:assembly
cd ${DIR}/baksmali && ${MVN} assembly:assembly

echo "Done."
cd ${DIR} && ls -lsh *smali/target/*smali-*-jar-with-dependencies.jar

java -jar baksmali/target/baksmali-1.3.3-dev-jar-with-dependencies.jar
